import { Component } from "react"


// import { useLocation } from "react-router-dom"

// function Infoc(){
//     let {search} = useLocation()
//     let ii = new URLSearchParams(search)
//     console.log(ii.get('id'));
//     return (
//         <div>
//             <p className='box'>
//                 Infocfn
//             </p>
//         </div>
//     )
// }

import { useParams, useLocation, useNavigate } from "react-router-dom"

function withRouter(Component) {
  return (props) => (
    <Component
      {...props}
      params={useParams()}
      location={useLocation()}
      navigate={useNavigate()}
    />
  );
}

class Infoc extends Component {
  constructor() {
    super()
    this.state = {

    }

  }

  render() {

    let ii = new URLSearchParams(this.props.location.search)
    console.log(ii.get('id'));
    return (
      <div className="box">
        Infocclass
      </div>
    )
  }
}

export default withRouter(Infoc)
// export default Infoc